Today optical codes, such as bar codes, are ubiquitously found on or associated with objects of various types, such as the packaging of retail, wholesale, and inventory goods; retail product presentation fixtures (e.g., shelves); goods undergoing manufacturing; personal or company assets; and documents. By encoding information, a bar code typically serves as an identifier of an object, whether the identification be to a class of objects (e.g., containers of milk) or a unique item (e.g., U.S. Pat. No. 6,012,639). Bar codes consist of alternating bars (i.e., relatively dark areas) and spaces (i.e., relatively light areas). The widths of the bars and spaces are often set to encode a desired information sequence, as the pattern of bars and spaces represents a string of binary ones and zeros, wherein the width of any particular bar or space is an integer multiple of a specified minimum width, which is called a “module” or “unit.” Thus, to decode the information, a bar code reader must be able to reliably discern the locations of edges demarking adjacent bars and spaces from one another across the entire length of the bar code.
Generally speaking, two typical classes of optical scanning equipment are utilized to generate image data, from which a bar code can be decoded. A first class of optical scanning equipment comprises a laser illumination source and a photodetector positioned to measure the reflection of the laser beam off the bar code. The laser produces a focused beam spot on a small area of the bar code. As the laser spot and the bar code move relative to each other, such that the spot is scanned across the bar code, a photodetector detects the laser light reflected off the bar code and produces an electrical signal whose magnitude is related to the optical power of the reflected signal. Thus, as the spot scans across the bar code, the photodetector generates an electrical signal whose variations over time at least roughly correlate to the spatial pattern of bars and spaces in the bar code. A second class of optical scanning equipment utilizes a camera or other imager to form an image of all or part of a bar code. In that case, the illumination source may be diffuse across the entire bar code, and the bar code may be imaged using a charge-coupled device (CCD) camera or a CMOS (complementary metal-oxide-semiconductor) imager, either of which forms an electronic image of the bar code. That electronic image can be sampled in the direction of the major axis of the bar code to generate a virtual scan line signal, which is like the scan line signal generated with a scanning laser spot. In any event, the result is an electronic scan line signal, which can be decoded to ascertain the information encoded into the bar code.
Flaws in the image of the bar code can make it impossible to read a sufficient portion of the bar code to enable decoding. Flaws can arise, for example, from the use of flood-type lighting with an imaging camera, especially when attempting to read shiny bar code labels and, in particular, shiny curved labels as found on beverage cans. As shown in FIG. 1, the specular reflection of the lighting source is seen as a bright “washed-out” region in the bar code image when the metal can is held at any angle close to normal at the optical axis. This problem and some solutions to it are described in commonly owned U.S. patent application Ser. No. 11/044,825, entitled “Data Reader and Methods for Imaging Targets Subject to Specular Reflection,” filed Jan. 26, 2005. This problem also can occur to a milder extent with the use of a laser scanner, as the illumination beam and the collected image field of view are narrower than with a camera imager. Techniques for dealing with flawed images of a bar code are complicated by the fact that the bar code may be moving across the reader's field of view.
Bar codes are just one example of the many types of optical codes in use today. In general, optical codes encode useful, optically-readable information about the items to which they are attached or otherwise associated. While bar codes generally encode information in a binary format across one dimension, higher-dimensional optical codes are also possible, such as, two-dimensional matrix codes (e.g., MaxiCode) or stacked codes (e.g., PDF 417). Decoding optical codes in general poses the same challenges, such as specular glare rendering part of a code's image flawed as well as motion of the code with respect to the imager, posed by bar codes in particular.